from numpy import cos, sin
from scipy import pi

class Point(object):
    """ 3D Point objects """
    x = 0.
    y = 0.
    z = 0.

    def rotate_z(self, theta):
        """ rotate the point around the Z axis """
        self.x = cos(theta) * self.x + sin(theta) * self.y
        self.y = -sin(theta) * self.x + cos(theta) * self.y
        
if __name__ == '__main__':
    p = Point()
    p.x = 1
    p.rotate_z(pi)
    p.x
    p.y
